package com.punai.customer.mapper;

import com.punai.common.core.mapper.CommonMapper;
import com.punai.customer.domain.CusExpenseCategories;
import com.punai.customer.domain.bo.CusCategoryBo;
import com.punai.customer.domain.bo.CusFbCategoryBo;
import com.punai.standard.domain.template.CusExpenseCategoriesExcel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 费用项类别Mapper接口
 *
 * @author zxw
 * @date 2022-12-04
 */
public interface CusExpenseCategoriesMapper extends CommonMapper<CusExpenseCategories>
{
    /**
     * 查询费用项类别
     *
     * @param id 费用项类别主键
     * @return 费用项类别
     */
    public CusExpenseCategories selectCusExpenseCategoriesById(@Param("id")String id,@Param("companyId") Long companyId);

    /**
     * 查询费用项类别列表
     *
     * @param cusExpenseCategories 费用项类别
     * @return 费用项类别集合
     */
    public List<CusExpenseCategories> selectCusExpenseCategoriesList(CusExpenseCategories cusExpenseCategories);

    public List<CusExpenseCategoriesExcel> selectListExp(@Param("companyId") Long companyId);

    public List<String> selectIdList(@Param("companyId") Long companyId);

    public List<CusExpenseCategories> selectCusExpenseCategoriesListCJ(@Param("name")String name,@Param("companyId") Long companyId,@Param("noInIds")List<String> noInIds);


    /**
     * 删除费用项类别
     *
     * @param id 费用项类别主键
     * @return 结果
     */
    public int deleteCusExpenseCategoriesById(String id);

    /**
     * 批量删除费用项类别
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCusExpenseCategoriesByIds(String[] ids);

    List<CusCategoryBo> selectLinkDataAndEntity(@Param("companyId") Long companyId, @Param("gxIds") String[] gxIds);

    List<CusCategoryBo> selectGxFbLinkDataAndEntity(@Param("companyId") Long companyId, @Param("gxIds") String[] gxIds);

    List<CusCategoryBo> selectGxFbLinkDataAndEntitySta(@Param("companyId") Long companyId,@Param("versionId") String versionId, @Param("gxIds") List<String> gxIds);

    // 废弃
    List<CusFbCategoryBo> selectByFbIds(@Param("fbIds")List<String> fbIds, @Param("companyId")Long companyId,@Param("versionId") String versionId);

    List<CusExpenseCategories> selectExpenseCategoriesListByNoIds(@Param("companyId")Long companyId,@Param("noInIds")List<String> noInIds);

    String getGkItemById(@Param("id") String id,@Param("companyId")Long companyId,@Param("gkType")String gkType);
}
